﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace EmailMarketingCampaign
{
    public partial class TempleList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ListBox1.SelectedIndex = 0;
                Image1.ImageUrl = "~/templates/BasicLayout02.jpg";

            }


        }

        protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
        {


            if (ListBox1.Items[0].Selected)
            {
                Image1.ImageUrl = "~/templates/BasicLayout01.jpg";
            }

            if (ListBox1.Items[1].Selected)
            {
                Image1.ImageUrl = "~/templates/BasicLayout02.jpg";
            }

            if (ListBox1.Items[2].Selected)
            {
                Image1.ImageUrl = "~/templates/BasicLayout03.jpg";
            }
        }



        protected void btnSelect_Click(object sender, EventArgs e)
        {
            string temName = ListBox1.SelectedValue.ToString();
            Session["temName"] = temName;
            Response.Redirect("TypeofMessage.aspx");

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect("TypeofMessage.aspx");
        }







    }
}
